package com.luoshupeng.multidatasource.controller.index;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by luoshupeng on 2018-03-20 10:30
 */
@Controller
public class HomeController {

    /**
     * 首页
     * @return
     */
    @RequestMapping("/")
    public String index() {
        return "system/index";
    }
    /**
     * 跳转
     * @return
     */
    @RequestMapping("/redirect")
    public String page2() {
        return "redirect/redirect";
    }
    
    /**
     *视图
     * @param model
     * @return
     */
    @RequestMapping("/model")
    public String page3(Model model){
        model.addAttribute("name","seawater");
        return "user";
    }
}
